package com.jt.enums;

import lombok.Getter;

/*
 *
 *
 */
@Getter
public enum ResponseStatus {
    SUCCESS(200, "成功"),
    FAILURE(400, "失败"),
    ERROR(500, "系统异常"),
    BAD_REQUEST(401, "请求参数错误"),
    UNAUTHORIZED(402, "未认证"),
    FORBIDDEN(403, "无权限"),
    NOT_FOUND(404, "资源不存在"),
    METHOD_NOT_ALLOWED(405, "方法不允许"),
    REQUEST_TIMEOUT(408, "请求超时"),
    CONFLICT(409, "资源冲突"),
    GONE(410, "资源已删除"),
    SQL_ERROR(411, "SQL错误"),
    THE_USERNAME_OR_PASSWORD_CANNOT_BE_EMPTY(412, "用户名或密码不能为空"),
    USERNAME_PASSWORD_ERROR(413, "用户名或密码错误"),
    THE_USERNAME_CANNOT_BE_EMPTY(414, "用户名不能为空"),
    USERNAME_ERROR(415, "用户名错误"),
    TOKEN_ILLEGAL_EXCEPTION(416,"token非法" );
    //响应状态码
    private final Integer code;
    //响应信息
    private final String message;

    ResponseStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
